﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRAdminUI/AdminMaster.Master" AutoEventWireup="true" CodeBehind="LeaveForm.aspx.cs" Inherits="HRM.UI.HRAdminUI.Profile.EmpLeaveForm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
     <link href="../../HRManagerUI/../../Styles/Employee/AddEmployeeCss.css" rel="stylesheet" type="text/css" />
    <link href="../../HRManagerUI/../../Styles/LeaveForm/LeaveCss.css" rel="stylesheet" type="text/css" />
    <link href="../../HRManagerUI/../../Scripts/htmlDatePicker.css" rel="stylesheet" type="text/css" />
    <script src="../../HRManagerUI/../../Scripts/htmlDatePicker.js" type="text/javascript"></script>
   <script type="text/javascript" language="javascript">

       function CheckField() {
           if (document.getElementById("<%=txtStartDate.ClientID%>").value == "") {
               document.getElementById("<%=msgLebel.ClientID%>").textContent = "Please Choose Leave Start date!";
               document.getElementById("<%=msgLebel.ClientID%>").style.color = "red";
               document.getElementById("<%=txtStartDate.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=txtEndDate.ClientID%>").Value == "") {
               document.getElementById("<%=msgLebel.ClientID%>").textContent = "Please Choose Leave end Date!";
               document.getElementById("<%=msgLebel.ClientID%>").style.color = "red";
               document.getElementById("<%=txtEndDate.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=txtTotalDays.ClientID%>").Value == "") {
               document.getElementById("<%=msgLebel.ClientID%>").textContent = "Please write total leave days!";
               document.getElementById("<%=msgLebel.ClientID%>").style.color = "red";
               document.getElementById("<%=txtTotalDays.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=ddlLeaveType.ClientID%>").Value == "") {
               document.getElementById("<%=msgLebel.ClientID%>").textContent = "Please Choose Any One Leave Type!";
               document.getElementById("<%=msgLebel.ClientID%>").style.color = "red";
               document.getElementById("<%=ddlLeaveType.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=txtLeaveSubject.ClientID%>").Value == "") {
               document.getElementById("<%=msgLebel.ClientID%>").textContent = "Please write subject!";
               document.getElementById("<%=msgLebel.ClientID%>").style.color = "red";
               document.getElementById("<%=txtLeaveSubject.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=txtLeaveMessage.ClientID%>").Value == "") {
               document.getElementById("<%=msgLebel.ClientID%>").textContent = "Please write something in Message box!";
               document.getElementById("<%=msgLebel.ClientID%>").style.color = "red";
               document.getElementById("<%=txtLeaveMessage.ClientID%>").focus();
               return false;
           }
           return true;
       }
  

    </script>
    <table class="mainLeaveTB">
        <tr>
            <td style="width: 75%">
                <table id="leaveMainTB">
                    <tr>
                        <td colspan="2" class="applyTitle">
                            Leave Application Form
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Label runat="server" ID="msgLebel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table width="100%" class="miniTable">
                                <tr>
                                    <td>
                                        Start Date<input type="text" runat="server" id="txtStartDate" class="textboxinput"
                                            readonly onclick="GetDate(this);" /><span class="estaricStar">*</span>
                                        <td>
                                            End Date
                                            <input type="text" runat="server" id="txtEndDate" class="textboxinput" readonly onclick="GetDate(this);" /><span
                                                class="estaricStar">*</span>
                                        </td>
                                        <td>
                                            Total Days
                                            <input type="text" runat="server" id="txtTotalDays" class="textboxinput" /><span class="estaricStar">*</span>
                                        </td>
                                        <td>
                                            Type<select id="ddlLeaveType" runat="server" class="dropdownCss">
                                                <option value="Deafult">--Choose Type--</option>
                                                <option value="Earn Leave">Earn Leave</option>
                                                <option value="Sick Leave">Sick Leave</option>
                                                <option value="Casual Leave">Casual Leave</option>
                                                <option value="Others">Others</option>
                                            </select><span class="estaricStar">*</span>
                                        </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="Labelapp">
                            <br />
                            Subject
                        </td>
                        <td class="Fieldapp">
                            <br />
                            <input type="text" runat="server" id="txtLeaveSubject" class="inputTextareat" /><span class="estaricStar">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="Labelapp">
                            Message
                        </td>
                        <td class="Fieldapp">
                            <textarea cols="13" rows="3" id="txtLeaveMessage" runat="server" class="inputTextareat"></textarea><span class="estaricStar">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <input type="submit" runat="server" id="btnLeave" value="Apply Now" class="btnCss"
                                onserverclick="BtnApplyNow" onclick="return CheckField()" />
                        </td>
                    </tr>
                </table>
            </td>
            <td style="width: 25%" valign="top">
                <table class="status">
                    <tr>
                        <td class="applyTitle" colspan="2">
                            Remaining Leave
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Earn Leave:
                        </td>
                        <td>
                            <asp:Label runat="server" ID="earnLeaveLbl" Width="50px" Font-Bold="True" CssClass="statuss"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Casual Leave:
                        </td>
                        <td>
                            <asp:Label runat="server" ID="casualLeaveLbl" Width="50px" Font-Bold="True" CssClass="statuss"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Sick Leave:
                        </td>
                        <td>
                            <asp:Label runat="server" ID="sickLeaveLbl" Width="50px" Font-Bold="True" CssClass="statuss"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Others :
                        </td>
                        <td>
                            <asp:Label runat="server" ID="otherLbl" Width="50px" Font-Bold="True" CssClass="statuss"></asp:Label>
                        </td>
                    </tr>
                   
                            
                            
                       
                </table>
                Please fill this field must where you get <span class="estaricStar">*</span> symbol
            </td>
        </tr>
    </table>
</asp:Content>
